home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / misc / math / aYaSieveNT_1_3.lha / ayasievent / aYaSieveNT.ReadMe < prev    next >
Encoding:
Text File  |  1997-07-04  |  3.1 KB  |  78 lines

  1. Short:    fastest Sieve of Eratosthenes prime test
  2. Uploader: madmax@uni-paderborn.de (Dirk Held)
  3. Author:   madmax@uni-paderborn.de (Dirk Held)
  4. Type:     misc/math
  5. Replaces  misc/math/aYaSieve
  6. Version:  1.3
  7.  
  8.  
  9. Just to end(?) this contest "Who writes the fastest Sieve of Eratosthenes"
  10.  
  11.                  Tatahh ! Here comes .... AndYetAnotherSieveNT
  12.                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  13.  
  14.                (the fastest prime-number computer at this time)
  15.                   ((well ... was just kidding last time.;-))
  16.               [NT := (Next|Nice)Try | NewTechnology | Nose-Tip(ahead)]
  17.  
  18.  
  19. On  my system (A4k40+FPU+MMU,25 MHz, 16 MB RAM) it tests primes upto
  20. 240.000.000 in about 223.3 seconds !
  21. 100.000.000 in about  88.1 seconds,
  22.  10.000.000 in about   7.5 seconds,
  23.   1.000.000 in less than 0.6 seconds
  24.  
  25. So it´s about 6% faster and 3% larger than the previous Version.
  26.  
  27. The time cost ist about O(n*1.1) = O(n), this means, if the Programm calcs to a
  28. 10 times higher Number, the Program needs 11 times longer. The Program needs about
  29. Number DIV 16 Bytes Memory.
  30.  
  31. So this Implementation of the Sieve of Eratosthenes is (still) about 4% faster, needs
  32. the same RAM, and has (sniff) 3.8 times the size of the similar Program YaYaSieve.
  33.  
  34. Usage: aYaSieveNT [-(?|h|v|t)] Number
  35.  
  36.         -? -h   prints Usage ;-)
  37.         -v      Verbose Mode (all Primes are printed....)
  38.         -t      Test Mode : checks, if Number is Prime
  39.         Number  to test 2..Number for primality (Number < 2^32 ;-)
  40.  
  41. aYaSieveNT is completely written in *pure* Amiga Modula-II. The amiga version is
  42. compiled with "Amiga Modula-2 Compiler 68881, 4.301d, 19.06.94, © AMSoft"
  43. This is NOT a trick, and it isn´t S*N! either.
  44.  
  45. This Program runs on every Amiga with Kick 2.0
  46.  
  47. The source ain't nevertheless available (YET). I WILL NOT *sell*, but publish it
  48. later for free. If you are interested contact me: madmax@uni-paderborn.de
  49.  
  50. It is strictly ALLOWED to produce any aYaSieveNT-like program without
  51. my permission :). (But who really cares about it ? Proggis like these are`n
  52. usefull to factorise LARGE numbers (i.e. 100 or more digits), so why bother.
  53. Try KillPrime on Aminet instead (Hi Brice:).
  54.  
  55.                           *IMPORTANT*
  56.  
  57. NO (more?) BUG
  58.  
  59. ups, there used to be a Bug (thank you Brice), but it´s already converted to a
  60. feature, before you (Brice) noticed it. Due to internal limitations, my program
  61. at least sieves to 6721, so wYgimtYw (what You get, is more than You wanted).
  62.  
  63. This readme is just a 1 minutes copycopy draft. :)
  64. If you have questions drop me a mail.
  65.  
  66. Hellos and Greetings going out to: - everyone, who´s able to code a at least 10%
  67.                                      faster Version of Eratothenes´s Sieve
  68.                                      (according to Big-o Notation)
  69.  
  70.                                    - those guys, which prefer a REAL 32 Bit (or
  71.                                      even 64 ??) Maschine
  72.  
  73. Aetschi-Baetschis and Buuhs going out to: - nobody
  74.  
  75.                                           - or those guys, which are proud
  76.                                             to cope with a 64K or 640K
  77.                                             Barrier on Systems without an OS.
  78.